import request from '@/api/request';

// 获取用户频道列表
export function loadChannelsApi() {
  return request({
    method: "GET",
    url: "/app/v1_0/user/channels"
  });
} 

// 获取所有频道列表
export function getAllChannelsApi() {
  return request({
    method: "GET",
    url: "/app/v1_0/channels"
  })
}

// 批量修改用户频道列表（部分覆盖）
export function resetUserChannelsApi(data) {
  return request({
    method: "PATCH",
    url: "/app/v1_0/user/channels",
    data
  })
}

// 删除指定用户频道
export function deleteUserChannelApi(channelId) {
  return request({
    method: "DELETE",
    url: `/app/v1_0/user/channels/${channelId}`,
    data: {
      channels:[channelId]
    }
  })
}